public class MediaAdapter implements MediaPlayer {
    private AdvacedMediaplayer mediaplayer;

    public MediaAdapter(String audioType){
        if (audioType.equalsIgnoreCase("vlc")) {
           mediaplayer = new VlcPlayer();
        }else if(audioType.equalsIgnoreCase("mp4")){
          mediaplayer =  new Mp4Player();
        }
    }

    @Override
    public void play(String audioType) {
        if (audioType.equalsIgnoreCase("vlc")) {
            mediaplayer.playVlc();
        } else if (audioType.equalsIgnoreCase("mp4")) {
            mediaplayer.playMp4();
        }
    }
}
